{{ partial "header.html" . }}

<div class="container">
<main class="list">
{{ range where ( where .Site.RegularPages "Date" "le" (now.AddDate 0 0 1 )) "Date" "ge" (now.AddDate 0 0 -2) }}
<section class="article-list">
  <h1><a href="{{ .LinkTitle  }}">{{ .Title }}</a></h1>
  <div class="date-author">
    {{ if .Params.author }}<span class="author">{{ partial "author_names.html" . }}</span> / {{ end }}
    <span class="date">{{ .Date.Format "2006-01-02" }}</span>
  </div>
  <div class="summary">
    <a href="{{ .URL  }}">
    {{ with .Params.thumbnail }}
    <div class="thumbnail"><img src="{{ relURL . }}" alt="Thumbnail" /></div>
    {{ else }}
    {{ $img := findRE "<img src=\"[^\"]+\"" .Content 1 }}
    {{ range $img }}
    <div class="thumbnail">{{ (print . " alt=\"Thumbnail\" />") | safeHTML }}</div>
    {{ end }}
    {{ end }}
    {{ with .Description }}
      {{ $.Scratch.Set "summary" (markdownify .) }}
    {{ else }}
      {{ $.Scratch.Set "summary" ((delimit (findRE "(<p.*?>(.|\n)*?</p>\\s*)+" .Content) "[&hellip;] ") | plainify | truncate (default 200 .Site.Params.summary_length) (default " &hellip;" .Site.Params.text.truncated ) | replaceRE "&amp;" "&" | safeHTML) }}
    {{ end }}
    {{ $.Scratch.Get "summary" }}
    </a>
  </div>
</section>
{{ end }}
</main>
</div>

{{ partial "footer.html" . }}
